<template>
  <div class="particles-js-box">
    <div id="particles-js"></div>
  </div>
</template>

<script>
import particlesConfig from '../particles/particles.json'
export default {
  data () {
    return {}
  },
  mounted () {
    this.init()
  },
  // mounted () {
  //   window.particlesJS('particles-js', particlesConfig)
  // },
  methods: {
    init () {
      // window.particlesJS('particles-js', particlesConfig)
      window.particlesJS('particles-js', particlesConfig)
      document.body.style.overflow = 'hidden'
    }

  }
}
</script>

<style scoped>
.particles-js-box{
  position:fixed;
  width: 100%;
  background-color: red;
  height: 100%;
  top:0;
  left:0;
  z-index:-1;
}
#particles-js{
  /*// background-color: #18688D;*/
  width: 40px;
  height: 40px;
  background:url("../../../assets/images/zhongyao2.png");
}
</style>
